﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LaughingDog
{
    /// <summary>
    /// Base class that everything in LaughingDog inherits from.
    /// </summary>
    public class Object
    {
        private const String DEFAULT_NAME = "name";

        private Guid mGuid;
        private String mName = DEFAULT_NAME;

        private String mTag = "";
        private object mTagObject;
        private Boolean mActive = true;

        /// <summary>
        /// The GUID of the object.
        /// </summary>
        public Guid Guid { get { return mGuid; } }

        /// <summary>
        /// The name of the object.
        /// </summary>
        public String Name { get { return mName; } set { mName = value; } }

        /// <summary>
        /// The tag of the object.
        /// </summary>
        public String Tag { get { return mTag; } set { mTag = value; } }

        /// <summary>
        /// A generic object you can set to anything you like.
        /// </summary>
        public object TagObject { get { return mTagObject; } set { mTagObject = value; } }

        /// <summary>
        /// Activate/Deactivate the object.
        /// </summary>
        public Boolean Active { get { return mActive; } set { mActive = value; } }

        public Object()
        {
            mGuid = Guid.NewGuid();
        }

        /// <summary>
        /// Returns the instance ID of the object.
        /// </summary>
        /// <returns></returns>
        public Guid GetInstanceID()
        {
            return mGuid;
        }        
    }
}
